import router from '@/router'
import { message } from '@/libs'
import store from '@/store'
router.beforeEach((to, from, next) => {
  if (!to.meta.user) {
    return next()
  }
  if (store.getters.token) {
    return next()
  }
  next('/')
})
